
<%@ page import="auction.Auction" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'auction.label', default: 'Auktion')}" />
        <title><g:message code="default.list.label" args="[entityName]" /></title>
    </head>
    <body>
                <div class="body">
            <h1>Auktion</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <div class="list">
                <table>
                    <thead>
                        <tr>
                        	<th>Bild</th>
                        
                            <th>Titel</th>
                        
                            <th>Start</th>
                            
                            <th>Ende</th>
                        
                            <th>Beschreibung</th>
                        
                            <th>Startpreis</th>
                            
                            <th>H&ouml;chstgebot</th>
                        
                        </tr>
                    </thead>
                    <tbody>
                    <g:each in="${auctionInstanceList}" status="i" var="auctionInstance">
                        <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
                        
                            <td style= "width:100px;"> <g:displayFile filename="${auctionInstance.filename}"
                 user="${auctionInstance.user}" /></td>
                 
                           
                            <td><g:link action="show" id="${auctionInstance.id}">${fieldValue(bean: auctionInstance, field: "heading")}</g:link></td>
                        
                            <td><g:formatDate date="${auctionInstance.startDate}" format="dd/MM/yyyy"/></td>
                            
                            <td><g:formatDate date="${auctionInstance.endDate}" format="dd/MM/yyyy"/></td>
                        
                            <td>${fieldValue(bean: auctionInstance, field: "description")}</td>
                        
                            <td>${fieldValue(bean: auctionInstance, field: "startprice")}</td>
                            
                            <td>${auctionInstance.highestBid?.bidAmount}</td>
                      
                        </tr>
                    </g:each>
                    </tbody>
                </table>
            </div>
            <div>
            </br>
            <span class="menuButton"><g:link class="create" action="create"><g:submitButton id="generalButton" name="Auktion anlegen" /></g:link></span>
            </div>
            <div class="paginateButtons">
                <g:paginate total="${auctionInstanceTotal}" />
            </div>
        </div>
    </body>
</html>
